package com.yfp.tissue.api;

import com.yfp.common.core.constant.SecurityConstants;
import com.yfp.common.core.constant.ServiceNameConstants;
import com.yfp.common.core.domain.R;
import com.yfp.tissue.api.factory.RemoteCompanyFallbackFactory;
import com.yfp.tissue.domain.Company;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 
 * @version 1.0
 * @date 2024-08-13 15:52
 */
@FeignClient(contextId = "remoteCompanyService", value = ServiceNameConstants.TISSUE_SERVICE, fallbackFactory = RemoteCompanyFallbackFactory.class)
public interface RemoteCompanyService {

    @PostMapping("/company/add")
    public R add(@RequestBody Company company);
    @PostMapping("/company/updateCompany")
    R updateCompany(@RequestBody Company company);
    @GetMapping("/company/findByCompanyAccount")
    R<Company> findByCompanyAccount(String companyAccount);
    @DeleteMapping("/company/del")
    R<Void> del(String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
